﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExceptionView.aspx.cs"
    Inherits="BEGDC.CC.Web.Admin.ExceptionView" %>

<%@ Register Src="../UserControls/Pager.ascx" TagName="Pager" TagPrefix="cc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/content/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <link href="../css/content/entity.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="../js/jquery-ui.min.js" type="text/javascript"></script>

    <script src="../js/entity.js.aspx" type="text/javascript"></script>

</head>
<body>
    <form runat="server">
    <div class="mainbox">
        <div class="sitemapbox">
            <div id="info" class="sitemap">
                &nbsp;&raquo;&nbsp;Administration&nbsp;&raquo;&nbsp; Exception Log
            </div>
        </div>
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <!--tab区域-->
                    <div class="tabbox purplebg_dark">
                        <ul class="tabpos">
                            <li><span class="tab_active">
                                <%=Resources.PageTitles.ExceptionLog%></span></li>
                        </ul>
                    </div>
                    <div class="formbox">
                        <span class=" float_lft">
                            <div class="formbox_float_lft">
                                <asp:Button ID="BtnAdd" runat="server" CssClass="entity-add" Style="display: none" />
                            </div>
                            <div class="formbox_float_rgt">
                                <asp:TextBox ID="SearchText" runat="server" CssClass="txtbox width140 entity-search-text"
                                    ToolTip="Exception Message"></asp:TextBox>
                                <asp:Button ID="Searchbtn" runat="server" CssClass="entity-search" />
                                <asp:Button ID="Cleanbtn" runat="server" CssClass="entity-clear" />
                            </div>
                        </span>
                    </div>
                </td>
            </tr>
        </table>
        <table width="100%" cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr>
                    <td>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                            AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="EntityDataSource1"
                            CssClass="tablestyle">
                            <RowStyle CssClass="tbody" />
                            <HeaderStyle CssClass="thead" ForeColor="#ffffff" />
                            <Columns>
                                <asp:BoundField DataField="ID" HeaderText="ID<br/>标识" ReadOnly="True" SortExpression="ID"
                                    HtmlEncode="false" ItemStyle-Width="5%"/>
                                <asp:BoundField DataField="ExceptionType" HeaderText="Exception Type<br/>异常类型" SortExpression="ExceptionType"
                                    HtmlEncode="false" ItemStyle-Width="26%"/>
                                <asp:TemplateField HeaderText="Exception Message<br/>异常描述" SortExpression="ExceptionMessage">
                                    <ItemTemplate>
                                        <div class="ellipsis_row">
                                            <%#HttpUtility.HtmlEncode((string)Eval("ExceptionMessage")) %></div>
                                    </ItemTemplate>
                                    <ItemStyle Width="40%" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="ExceptionOccurTime" HeaderText="Exception OccurTime<br/>异常触发时间"
                                    SortExpression="ExceptionOccurTime" HtmlEncode="false" ItemStyle-Width="15%"/>
                                <asp:BoundField DataField="Trigger" HeaderText="Operator<br/>操作人" SortExpression="Trigger"
                                    HtmlEncode="false" ItemStyle-Width="10%"/>
                                <asp:ActionField HeaderText="Action<br />操作" ShowViewButton="true" />
                            </Columns>
                            <PagerTemplate>
                                <cc:Pager runat="server" />
                            </PagerTemplate>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="EntityDataSource1"
                            Visible="False" CssClass="tablestyle2" Width="98%" AutoGenerateRows="False" DataKeyNames="ID">
                            <HeaderStyle CssClass="tablestyle2_Title"></HeaderStyle>
                            <HeaderTemplate>
                                异常日志查看
                            </HeaderTemplate>
                            <FieldHeaderStyle CssClass="tablestyle2_tdTitle" />
                            <Fields>
                                <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" />
                                <asp:BoundField DataField="ExceptionType" HeaderText="Exception Type" />
                                <asp:TemplateField HeaderText="Exception Message">
                                    <ItemTemplate>
                                        <div style="width: 800px; overflow-x: scroll;">
                                            <pre><%#HttpUtility.HtmlEncode((string)Eval("ExceptionMessage")) %></pre>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="ExceptionOccurTime" HeaderText="ExceptionOccurTime" />
                                <asp:BoundField DataField="Trigger" HeaderText="Operator" />
                                <asp:ActionField ShowCloseButton="true" />
                            </Fields>
                        </asp:DetailsView>
                        &nbsp;
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <%--以下是数据源--%>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=CCEntities"
        DefaultContainerName="CCEntities" EnableDelete="True" EntitySetName="SystemExceptionLogs"
        OrderBy="it.ID DESC" Where="it.ID>1">
    </asp:EntityDataSource>
    </form>
    <%--页面刷新时显示--%>
    <div id="dialog-message" title="Loading..." style="display: none">
        <p>
            <br />
            <span class="entity-loading"></span><span>Operation in process, please wait...<br />
                <br />
                处理中, 请稍候。。。</span>
        </p>
    </div>
</body>
</html>
